package studio.raptor.hub.common.constant;

/**
 * hub-out模块 常量类
 * 
 * @author liuyong@asiainfo.com 2017年5月15日 下午3:17:40
 */
public class HubOutConstant {

    public static class AdapterType {
        public static final String HTTP = "hhtp";
        public static final String TABLE = "table";
        public static final String SOAP = "soap";
        public static final String MQ = "mq";
        public static final String SOCKET = "socket";
    }

    public static class SendMsgType {
        /**
         * json格式报文
         */
        public static final String JSON = "json";

        /**
         * xml格式报文
         */
        public static final String XML = "xml";
    }

    public static class Adapter {
        public static final String NAME = "name";
        public static final String CODE = "code";
        public static final String SQL = "sql";
        public static final String DATASOURCE = "datasource";
    }

    public static class ExceptionMsg {
        public static final String XML_FAIL = "配置中xml格式错误";
        public static final String PARAM_FAIL = "解析参数出错";
    }

    public static class ResponseCode {

        /**
         * 成功
         */
        public static final String SUCCESS = "0000";

        /**
         * 渠道配置不匹配
         */
        public static final String CONF_FAIL = "0001";

        /**
         * xml格式错误
         */
        public static final String XML_FAIL = "0002";

        /**
         * 参数错误
         */
        public static final String PARAM_FAIL = "0003";

        /**
         * 发送异常
         */
        public static final String SEND_FAIL = "0004";

        /**
         * 类不存在
         */
        public static final String CLASS_NOT_EXIT = "0005";

        /**
         * 方法不存在
         */
        public static final String METHOD_NOT_EXIT = "0006";

        public static final String FAIL = "0007";

    }

    public static class ResponseMsg {
        public static final String SUCCESS_MSG = "成功";
        public static final String CONF_FAIL = "渠道配置错误";
        public static final String XML_FAIL = "xml格式错误";
        public static final String PARAM_FAIL = "参数错误";
        public static final String SEND_FAIL = "发送异常";
        public static final String CLASS_NOT_EXIT = "类不存在";
        public static final String METHOD_NOT_EXIT = "方法不存在";
        public static final String FAIL = "通用失败";
    }
}
